package com.yuelife.service.impl;

import com.yuelife.dao.SendgoodDao;
import com.yuelife.dto.IdDTO;
import com.yuelife.dto.SendOrderDTO;
import com.yuelife.pojo.Sendgood;
import com.yuelife.service.SendGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author by Rxzeg
 * @date 2020-07-02 11:45
 * @describe
 */
@Service
public class SendGoodServiceImpl implements SendGoodService {
    @Autowired
    private SendgoodDao sendgoodDao;
    @Override
    public void add(SendOrderDTO sendOrderDTO, String order_id, IdDTO idDTO) {
        Sendgood sendgood=new Sendgood();
        sendgood.setOrderId(order_id);
        sendgood.setSendGoodType(sendOrderDTO.getSendGoodType());
        sendgood.setSendGoodValue(sendOrderDTO.getSendGoodValue());
        sendgood.setSendGoodWeight(sendOrderDTO.getSendGoodWeight());
        sendgoodDao.insert(sendgood);
        idDTO.setD_id(sendgood.getId());
    }



}
